package util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcUtil {
    public static Connection  getConnection() throws SQLException, ClassNotFoundException {
        String driver="com.mysql.cj.jdbc.Driver";
        String url="jdbc:mysql://localhost:3306/warehouse";
        String username="root";
        String password="123456";
        Class.forName(driver);
        return DriverManager.getConnection(url,username,password);
    }
}
